<?php

use Workerman\Worker;

defined('CHAT_PATH') or define('CHAT_PATH',__DIR__);
defined('GLOBAL_START') or define('GLOBAL_START',1);

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

require ROOT_PATH . '/vendor/yiisoft/yii2/Yii.php';
require ROOT_PATH . '/common/config/bootstrap.php';
require CHAT_PATH . '/config/bootstrap.php';
require CHAT_PATH . '/Events.php';

foreach(glob(CHAT_PATH . '/start/*.php') as $start_file){
    require $start_file;
}

Worker::runAll();